package com.example.sprintboot.dto;

/**
 * 分类查询DTO
 */
public class GourmetQueryDto {
    private Integer id;
    private String title;
    private Integer pageNum = 1;
    private Integer pageSize = 4;

    public GourmetQueryDto() {}

    public GourmetQueryDto(Integer id) {
        this.id = id;
    }

    public GourmetQueryDto(String title, Integer pageNum, Integer pageSize) {
        this.title = title;
        this.pageNum = pageNum != null ? pageNum : 1;
        this.pageSize = pageSize != null ? pageSize : 4;
    }

    // Getters and Setters
    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public Integer getPageNum() {
        return pageNum;
    }

    public void setPageNum(Integer pageNum) {
        this.pageNum = pageNum != null ? pageNum : 1;
    }

    public Integer getPageSize() {
        return pageSize;
    }

    public void setPageSize(Integer pageSize) {
        this.pageSize = pageSize != null ? pageSize : 4;
    }
}
